﻿<controls:ChildWindow x:Class="RegOnline.DobTrebChildWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"

           Title="Добавление нового требования" Loaded="ChildWindow_Loaded" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d:DesignHeight="149" d:DesignWidth="475" FontSize="12">
    <Grid x:Name="LayoutRoot" Margin="2" Width="444" HorizontalAlignment="Center" >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="311" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition Height="10" />
            <RowDefinition Height="38" />
        </Grid.RowDefinitions>

        <sdk:Label Content="Расширение:" Grid.Row="1" HorizontalAlignment="Right" Margin="0,6,0,0" FontSize="12" />
        <TextBox Grid.Column="1" Grid.Row="1"  Margin="4,6,12,0" Name="expdocTextBox" Text="{Binding Path=LR.expdoc, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" TextChanged="expdocTextBox_TextChanged">
            <ToolTipService.ToolTip>
                <TextBlock MaxWidth="300"
                                        Text=" *.имя_расширения, ... Пример: *.doc, *.docx"
                                         FontFamily="Georgia" FontSize="14" TextWrapping="Wrap"/>
            </ToolTipService.ToolTip>
        </TextBox>
        <sdk:Label Content="Название требования:" HorizontalAlignment="Right" Margin="0,6,0,0" FontSize="12" />
        <Grid Margin="3,3,-3,27" Grid.Column="1" Grid.RowSpan="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="264*" />
                <ColumnDefinition Width="47"/>
            </Grid.ColumnDefinitions>
        <ComboBox DisplayMemberPath="nameReq" HorizontalAlignment="Stretch" ItemsSource="{Binding}" Margin="1,3,0,3" Name="nameReqComboBox" FontSize="12" SelectionChanged="nameReqComboBox_SelectionChanged">
            <ComboBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel />
                </ItemsPanelTemplate>
            </ComboBox.ItemsPanel>
        </ComboBox> 
            <Button x:Name="btAddNewTreb" Content="+" FontSize="13" Margin="8,2,15,4" Grid.Column="1" Click="btAddNewTreb_Click" />
        </Grid>
        <Button x:Name="CancelButton" Content="Отмена" Grid.Row="3" Grid.Column="1" Click="CancelButton_Click" Margin="215,8,12,2" FontSize="11" />
        <Button x:Name="OKButton" Content="Сохранить" Grid.Row="3" Grid.Column="1" Click="OKButton_Click" Margin="124,8,0,2" FontSize="11" HorizontalAlignment="Left" Width="85" />
        <sdk:Label Grid.ColumnSpan="2" Grid.Row="2" Height="28" HorizontalAlignment="Left" Margin="118,18,0,0" Name="label1" VerticalAlignment="Top" Width="151" Foreground="#FFC90000" FontSize="12" Content="Заполните все поля!" Grid.RowSpan="2" Visibility="Collapsed" />
    </Grid>
</controls:ChildWindow>